<template>
  <div class="table-box">
    <ProTable ref="proRef" :columns="columns" :request-api="demo"></ProTable>
  </div>
</template>

<script setup lang="ts">
import ProTable from "@/components/ProTable/index.vue";
import { ColumnProps } from "@/components/ProTable/interface";
import { ref } from "vue";

const demo = () => {
  return new Promise(res => {
    res(true);
  });
};

const proRef = ref<InstanceType<typeof ProTable> | null>();

const columns: ColumnProps[] = [
  { type: "selection", width: 80 },
  { prop: "phone", label: "手机号", fixed: "left" },
  { prop: "name", label: "线索来源" },
  { prop: "city", label: "意向城市" },
  { prop: "louPanName", label: "楼盘名称" },
  { prop: "region", label: "地区" },
  { prop: "origin", label: "端口" }, //来自哪个端口
  { prop: "originWeb", label: "来源网页" },
  { prop: "last_time", label: "客户最新录入时间" },
  { prop: "isValid", label: "验证状态" },
  { prop: "opera", label: "操作", width: 200, fixed: "right" }
];
</script>

<style></style>
